<template>
  <div>
    <BasicTable @register="registerTable"></BasicTable>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import BasicTable from '/@/components/BasicTable/BasicTable.vue';
import { useBasicTable } from '/@/components/BasicTable/hooks/useBasicTable';
import { columns, searchFormSchema } from './logs.data';
import { getSystemLogList } from '/@/api/maintenance-center/system-log/systemLogs';

export default defineComponent({
  components: {
    BasicTable,
  },
  setup() {
    const [registerTable] = useBasicTable({
      useSearchForm: true,
      immediate: false,
      usePagination: false,
      api: getSystemLogList,
      columns: columns,
      formConfig: {
        labelWidth: 100,
        schemas: searchFormSchema,
      },
    });
    return {
      registerTable,
    };
  },
});
</script>
